/*
Navicat MySQL Data Transfer

Source Server         : localhost57
Source Server Version : 50725
Source Host           : localhost:3306
Source Database       : star

Target Server Type    : MYSQL
Target Server Version : 50599
File Encoding         : 65001

Date: 2019-02-15 20:01:08
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `fight`
-- ----------------------------
DROP TABLE IF EXISTS `fight`;
CREATE TABLE `fight` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`matchid`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`num`  int(9) NULL DEFAULT NULL COMMENT '比赛数量' ,
`userone`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`onename`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`point1`  float NULL DEFAULT NULL ,
`usertwo`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`twoname`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`point2`  float NULL DEFAULT NULL ,
`winer`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`result`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of fight
-- ----------------------------
BEGIN;
INSERT INTO `fight` VALUES ('20190108223343100000287', '20190108223343100000286', '7', '1002', '小葱', '0.66', '1003', '小龙', '0.3', '1002', '4vs3 选手1胜---第1场2胜;第2场2胜;第3场1胜;第4场1胜;第5场1胜;第6场2胜;第7场1胜;'), ('20190108223343100000288', '20190108223343100000286', '7', '1006', '小补', '0.3', '1004', '小可', '0.3', '1004', '2vs5 选手2胜---第1场2胜;第2场2胜;第3场1胜;第4场2胜;第5场2胜;第6场1胜;第7场2胜;'), ('20190108223343100000289', '20190108223343100000286', '7', '1005', '小如', '0.3', '1001', '小勇', '0.75', '1001', '1vs6 选手2胜---第1场2胜;第2场1胜;第3场2胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190108223343100000290', '20190108223343100000286', '7', '1004', '小可', '0.3', '1001', '小勇', '0.75', '1001', '1vs6 选手2胜---第1场2胜;第2场2胜;第3场1胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190108223343100000291', '20190108223343100000286', '7', '1002', '小葱', '0.66', '1007', '小朱', '0.3', '1002', '5vs2 选手1胜---第1场1胜;第2场1胜;第3场1胜;第4场2胜;第5场1胜;第6场2胜;第7场1胜;'), ('20190108223343100000292', '20190108223343100000286', '7', '1001', '小勇', '0.75', '1002', '小葱', '0.66', '1002', '3vs4 选手2胜---第1场2胜;第2场1胜;第3场2胜;第4场2胜;第5场1胜;第6场2胜;第7场1胜;'), ('20190201095432100000337', '20190201095432100000336', '7', '1007', '小朱', '0.3', '1005', '小如', '0.3', '1005', '3vs4 选手2胜---第1场1胜;第2场2胜;第3场1胜;第4场1胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095432100000338', '20190201095432100000336', '7', '1003', '小龙', '0.3', '1004', '小可', '0.3', '1004', '1vs6 选手2胜---第1场2胜;第2场2胜;第3场2胜;第4场2胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095432100000339', '20190201095432100000336', '7', '1006', '小补', '0.3', '1002', '小葱', '0.66', '1002', '2vs5 选手2胜---第1场2胜;第2场2胜;第3场1胜;第4场2胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095432100000340', '20190201095432100000336', '7', '1005', '小如', '0.3', '1002', '小葱', '0.66', '1002', '1vs6 选手2胜---第1场2胜;第2场2胜;第3场1胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095432100000341', '20190201095432100000336', '7', '1001', '小勇', '0.75', '1004', '小可', '0.3', '1001', '4vs3 选手1胜---第1场1胜;第2场1胜;第3场1胜;第4场2胜;第5场2胜;第6场2胜;第7场1胜;'), ('20190201095432100000342', '20190201095432100000336', '7', '1002', '小葱', '0.66', '1001', '小勇', '0.75', '1002', '6vs1 选手1胜---第1场1胜;第2场1胜;第3场1胜;第4场1胜;第5场2胜;第6场1胜;第7场1胜;'), ('20190201095617100000386', '20190201095617100000385', '7', '1003', '小龙', '0.3', '1001', '小勇', '0.75', '1001', '2vs5 选手2胜---第1场1胜;第2场2胜;第3场2胜;第4场2胜;第5场2胜;第6场1胜;第7场2胜;'), ('20190201095617100000387', '20190201095617100000385', '7', '1006', '小补', '0.3', '1005', '小如', '0.3', '1006', '4vs3 选手1胜---第1场2胜;第2场1胜;第3场2胜;第4场1胜;第5场2胜;第6场1胜;第7场1胜;'), ('20190201095617100000388', '20190201095617100000385', '7', '1004', '小可', '0.3', '1002', '小葱', '0.66', '1002', '0vs7 选手2胜---第1场2胜;第2场2胜;第3场2胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095617100000389', '20190201095617100000385', '7', '1006', '小补', '0.3', '1007', '小朱', '0.3', '1007', '3vs4 选手2胜---第1场2胜;第2场2胜;第3场1胜;第4场2胜;第5场1胜;第6场2胜;第7场1胜;'), ('20190201095617100000390', '20190201095617100000385', '7', '1001', '小勇', '0.75', '1002', '小葱', '0.66', '1002', '3vs4 选手2胜---第1场2胜;第2场1胜;第3场2胜;第4场1胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095617100000391', '20190201095617100000385', '7', '1007', '小朱', '0.3', '1002', '小葱', '0.66', '1002', '1vs6 选手2胜---第1场1胜;第2场2胜;第3场2胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095639100000435', '20190201095639100000434', '7', '1003', '小龙', '0.3', '1004', '小可', '0.3', '1003', '4vs3 选手1胜---第1场1胜;第2场2胜;第3场2胜;第4场2胜;第5场1胜;第6场1胜;第7场1胜;'), ('20190201095639100000436', '20190201095639100000434', '7', '1006', '小补', '0.3', '1001', '小勇', '0.75', '1001', '1vs6 选手2胜---第1场2胜;第2场1胜;第3场2胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095639100000437', '20190201095639100000434', '7', '1007', '小朱', '0.3', '1002', '小葱', '0.66', '1002', '1vs6 选手2胜---第1场2胜;第2场2胜;第3场2胜;第4场2胜;第5场2胜;第6场1胜;第7场2胜;'), ('20190201095639100000438', '20190201095639100000434', '7', '1001', '小勇', '0.75', '1002', '小葱', '0.66', '1002', '3vs4 选手2胜---第1场1胜;第2场1胜;第3场2胜;第4场2胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095639100000439', '20190201095639100000434', '7', '1003', '小龙', '0.3', '1005', '小如', '0.3', '1003', '4vs3 选手1胜---第1场1胜;第2场2胜;第3场2胜;第4场2胜;第5场1胜;第6场1胜;第7场1胜;'), ('20190201095639100000440', '20190201095639100000434', '7', '1002', '小葱', '0.66', '1003', '小龙', '0.3', '1002', '5vs2 选手1胜---第1场1胜;第2场2胜;第3场2胜;第4场1胜;第5场1胜;第6场1胜;第7场1胜;'), ('20190201095641100000484', '20190201095641100000476', '7', '1004', '小可', '0.3', '1002', '小葱', '0.66', '1002', '2vs5 选手2胜---第1场1胜;第2场2胜;第3场1胜;第4场2胜;第5场2胜;第6场2胜;第7场2胜;'), ('20190201095641100000485', '20190201095641100000476', '7', '1005', '小如', '0.3', '1006', '小补', '0.3', '1005', '4vs3 选手1胜---第1场2胜;第2场1胜;第3场1胜;第4场1胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095641100000486', '20190201095641100000476', '7', '1007', '小朱', '0.3', '1003', '小龙', '0.3', '1007', '4vs3 选手1胜---第1场1胜;第2场2胜;第3场1胜;第4场1胜;第5场1胜;第6场2胜;第7场2胜;'), ('20190201095641100000487', '20190201095641100000476', '7', '1001', '小勇', '0.75', '1002', '小葱', '0.66', '1001', '4vs3 选手1胜---第1场2胜;第2场2胜;第3场1胜;第4场1胜;第5场2胜;第6场1胜;第7场1胜;'), ('20190201095641100000488', '20190201095641100000476', '7', '1007', '小朱', '0.3', '1005', '小如', '0.3', '1005', '3vs4 选手2胜---第1场1胜;第2场2胜;第3场1胜;第4场2胜;第5场2胜;第6场2胜;第7场1胜;'), ('20190201095641100000489', '20190201095641100000476', '7', '1001', '小勇', '0.75', '1005', '小如', '0.3', '1001', '7vs0 选手1胜---第1场1胜;第2场1胜;第3场1胜;第4场1胜;第5场1胜;第6场1胜;第7场1胜;');
COMMIT;

-- ----------------------------
-- Table structure for `fight_detail`
-- ----------------------------
DROP TABLE IF EXISTS `fight_detail`;
CREATE TABLE `fight_detail` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`fightid`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`seq`  int(9) NULL DEFAULT NULL COMMENT '比赛场次' ,
`point1`  float NULL DEFAULT 0 ,
`point2`  float NULL DEFAULT 0 ,
`result`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of fight_detail
-- ----------------------------
BEGIN;
INSERT INTO `fight_detail` VALUES ('20190108223343100000293', '20190108223343100000287', '1', '0.235501', '0.273026', '2'), ('20190108223343100000294', '20190108223343100000288', '1', '0.12339', '0.206388', '2'), ('20190108223343100000295', '20190108223343100000289', '1', '0.0919204', '0.295091', '2'), ('20190108223343100000296', '20190108223343100000290', '1', '0.0204425', '0.0331087', '2'), ('20190108223343100000297', '20190108223343100000291', '1', '0.304132', '0.102889', '1'), ('20190108223343100000298', '20190108223343100000292', '1', '0.251603', '0.522511', '2'), ('20190108223343100000299', '20190108223343100000287', '2', '0.00623764', '0.185255', '2'), ('20190108223343100000300', '20190108223343100000288', '2', '0.105556', '0.119731', '2'), ('20190108223343100000301', '20190108223343100000289', '2', '0.114935', '0.083913', '1'), ('20190108223343100000302', '20190108223343100000290', '2', '0.0842852', '0.250242', '2'), ('20190108223343100000303', '20190108223343100000291', '2', '0.431666', '0.198694', '1'), ('20190108223343100000304', '20190108223343100000292', '2', '0.567141', '0.220625', '1'), ('20190108223343100000305', '20190108223343100000287', '3', '0.256048', '0.133922', '1'), ('20190108223343100000306', '20190108223343100000288', '3', '0.174963', '0.0303934', '1'), ('20190108223343100000307', '20190108223343100000289', '3', '0.229424', '0.373256', '2'), ('20190108223343100000308', '20190108223343100000290', '3', '0.293519', '0.272743', '1'), ('20190108223343100000309', '20190108223343100000291', '3', '0.138505', '0.0890439', '1'), ('20190108223343100000310', '20190108223343100000292', '3', '0.247942', '0.587522', '2'), ('20190108223343100000311', '20190108223343100000287', '4', '0.590246', '0.0207334', '1'), ('20190108223343100000312', '20190108223343100000288', '4', '0.0745047', '0.077402', '2'), ('20190108223343100000313', '20190108223343100000289', '4', '0.168045', '0.690446', '2'), ('20190108223343100000314', '20190108223343100000290', '4', '0.172057', '0.393331', '2'), ('20190108223343100000315', '20190108223343100000291', '4', '0.264549', '0.282482', '2'), ('20190108223343100000316', '20190108223343100000287', '5', '0.547115', '0.146703', '1'), ('20190108223343100000317', '20190108223343100000292', '4', '0.153754', '0.568003', '2'), ('20190108223343100000318', '20190108223343100000288', '5', '0.0596671', '0.178085', '2'), ('20190108223343100000319', '20190108223343100000289', '5', '0.204181', '0.687635', '2'), ('20190108223343100000320', '20190108223343100000290', '5', '0.0102833', '0.0170487', '2'), ('20190108223343100000321', '20190108223343100000291', '5', '0.568974', '0.0634486', '1'), ('20190108223343100000322', '20190108223343100000287', '6', '0.0883609', '0.251306', '2'), ('20190108223343100000323', '20190108223343100000292', '5', '0.33366', '0.19123', '1'), ('20190108223343100000324', '20190108223343100000288', '6', '0.19271', '0.0930861', '1'), ('20190108223343100000325', '20190108223343100000289', '6', '0.0674576', '0.660457', '2'), ('20190108223343100000326', '20190108223343100000290', '6', '0.278662', '0.686699', '2'), ('20190108223343100000327', '20190108223343100000291', '6', '0.142269', '0.16118', '2'), ('20190108223343100000328', '20190108223343100000287', '7', '0.297019', '0.146567', '1'), ('20190108223343100000329', '20190108223343100000292', '6', '0.0287702', '0.449771', '2'), ('20190108223343100000330', '20190108223343100000288', '7', '0.0107975', '0.263404', '2'), ('20190108223343100000331', '20190108223343100000289', '7', '0.0201428', '0.272786', '2'), ('20190108223343100000332', '20190108223343100000290', '7', '0.169832', '0.659265', '2'), ('20190108223343100000333', '20190108223343100000291', '7', '0.0656901', '0.025536', '1'), ('20190108223343100000334', '20190108223343100000292', '7', '0.137254', '0.125615', '1'), ('20190201095432100000343', '20190201095432100000337', '1', '0.234668', '0.0350031', '1'), ('20190201095433100000344', '20190201095432100000338', '1', '0.134328', '0.222286', '2'), ('20190201095433100000345', '20190201095432100000339', '1', '0.174294', '0.177261', '2'), ('20190201095433100000346', '20190201095432100000340', '1', '0.12612', '0.528982', '2'), ('20190201095433100000347', '20190201095432100000341', '1', '0.432322', '0.214321', '1'), ('20190201095433100000348', '20190201095432100000342', '1', '0.457885', '0.0535532', '1'), ('20190201095433100000349', '20190201095432100000337', '2', '0.0404885', '0.130312', '2'), ('20190201095433100000350', '20190201095432100000338', '2', '0.0424111', '0.0932501', '2'), ('20190201095433100000351', '20190201095432100000339', '2', '0.150896', '0.607012', '2'), ('20190201095433100000352', '20190201095432100000340', '2', '0.217516', '0.446919', '2'), ('20190201095433100000353', '20190201095432100000341', '2', '0.668975', '0.211127', '1'), ('20190201095433100000354', '20190201095432100000342', '2', '0.587296', '0.4082', '1'), ('20190201095433100000355', '20190201095432100000337', '3', '0.152351', '0.0823613', '1'), ('20190201095433100000356', '20190201095432100000338', '3', '0.00947971', '0.136165', '2'), ('20190201095433100000357', '20190201095432100000340', '3', '0.256936', '0.0505571', '1'), ('20190201095433100000358', '20190201095432100000339', '3', '0.182872', '0.0511798', '1'), ('20190201095433100000359', '20190201095432100000341', '3', '0.553542', '0.152417', '1'), ('20190201095433100000360', '20190201095432100000342', '3', '0.372092', '0.348262', '1'), ('20190201095433100000361', '20190201095432100000337', '4', '0.295783', '0.0715274', '1'), ('20190201095433100000362', '20190201095432100000338', '4', '0.148152', '0.238476', '2'), ('20190201095433100000363', '20190201095432100000340', '4', '0.161389', '0.223677', '2'), ('20190201095433100000364', '20190201095432100000339', '4', '0.0237743', '0.503528', '2'), ('20190201095433100000365', '20190201095432100000341', '4', '0.0545269', '0.101689', '2'), ('20190201095433100000366', '20190201095432100000342', '4', '0.155577', '0.12529', '1'), ('20190201095433100000367', '20190201095432100000337', '5', '0.0188712', '0.0704292', '2'), ('20190201095433100000368', '20190201095432100000338', '5', '0.165802', '0.0286912', '1'), ('20190201095433100000369', '20190201095432100000340', '5', '0.0796441', '0.201467', '2'), ('20190201095434100000370', '20190201095432100000339', '5', '0.120556', '0.0421569', '1'), ('20190201095434100000371', '20190201095432100000341', '5', '0.0419395', '0.189561', '2'), ('20190201095434100000372', '20190201095432100000342', '5', '0.197051', '0.255914', '2'), ('20190201095434100000373', '20190201095432100000337', '6', '0.0859069', '0.176627', '2'), ('20190201095434100000374', '20190201095432100000338', '6', '0.0155137', '0.163295', '2'), ('20190201095434100000375', '20190201095432100000340', '6', '0.038136', '0.255519', '2'), ('20190201095434100000376', '20190201095432100000339', '6', '0.117055', '0.553957', '2'), ('20190201095434100000377', '20190201095432100000341', '6', '0.0486417', '0.198193', '2'), ('20190201095434100000378', '20190201095432100000342', '6', '0.255955', '0.0274325', '1'), ('20190201095434100000379', '20190201095432100000337', '7', '0.229003', '0.276337', '2'), ('20190201095434100000380', '20190201095432100000338', '7', '0.103254', '0.227073', '2'), ('20190201095434100000381', '20190201095432100000340', '7', '0.181677', '0.357626', '2'), ('20190201095434100000382', '20190201095432100000339', '7', '0.114335', '0.240519', '2'), ('20190201095434100000383', '20190201095432100000341', '7', '0.514577', '0.192043', '1'), ('20190201095434100000384', '20190201095432100000342', '7', '0.472258', '0.231542', '1'), ('20190201095617100000392', '20190201095617100000386', '1', '0.271713', '0.182867', '1'), ('20190201095617100000393', '20190201095617100000388', '1', '0.0883322', '0.298624', '2'), ('20190201095617100000394', '20190201095617100000387', '1', '0.10858', '0.274682', '2'), ('20190201095617100000395', '20190201095617100000389', '1', '0.0170301', '0.197307', '2'), ('20190201095617100000396', '20190201095617100000390', '1', '0.478765', '0.639601', '2'), ('20190201095617100000397', '20190201095617100000391', '1', '0.189201', '0.105677', '1'), ('20190201095617100000398', '20190201095617100000386', '2', '0.208907', '0.435466', '2'), ('20190201095617100000399', '20190201095617100000388', '2', '0.087499', '0.232533', '2'), ('20190201095617100000400', '20190201095617100000387', '2', '0.21283', '0.054608', '1'), ('20190201095617100000401', '20190201095617100000389', '2', '0.130813', '0.141811', '2'), ('20190201095617100000402', '20190201095617100000390', '2', '0.545457', '0.472979', '1'), ('20190201095617100000403', '20190201095617100000391', '2', '0.0325427', '0.479992', '2'), ('20190201095617100000404', '20190201095617100000386', '3', '0.0620998', '0.167901', '2'), ('20190201095617100000405', '20190201095617100000388', '3', '0.010739', '0.275075', '2'), ('20190201095617100000406', '20190201095617100000387', '3', '0.109769', '0.194093', '2'), ('20190201095617100000407', '20190201095617100000389', '3', '0.272828', '0.104163', '1');
INSERT INTO `fight_detail` VALUES ('20190201095617100000408', '20190201095617100000390', '3', '0.19723', '0.269457', '2'), ('20190201095617100000409', '20190201095617100000391', '3', '0.021374', '0.101786', '2'), ('20190201095617100000410', '20190201095617100000386', '4', '0.174161', '0.661776', '2'), ('20190201095618100000411', '20190201095617100000388', '4', '0.0435131', '0.51074', '2'), ('20190201095618100000412', '20190201095617100000387', '4', '0.192804', '0.11028', '1'), ('20190201095618100000413', '20190201095617100000389', '4', '0.197752', '0.212883', '2'), ('20190201095618100000414', '20190201095617100000390', '4', '0.676862', '0.225281', '1'), ('20190201095618100000415', '20190201095617100000391', '4', '0.256526', '0.515077', '2'), ('20190201095618100000416', '20190201095617100000386', '5', '0.0436481', '0.426343', '2'), ('20190201095618100000417', '20190201095617100000388', '5', '0.149787', '0.613793', '2'), ('20190201095618100000418', '20190201095617100000387', '5', '0.0641355', '0.113892', '2'), ('20190201095618100000419', '20190201095617100000389', '5', '0.230206', '0.136453', '1'), ('20190201095618100000420', '20190201095617100000390', '5', '0.601064', '0.32069', '1'), ('20190201095618100000421', '20190201095617100000391', '5', '0.0445735', '0.153485', '2'), ('20190201095618100000422', '20190201095617100000386', '6', '0.271891', '0.141568', '1'), ('20190201095618100000423', '20190201095617100000388', '6', '0.0286832', '0.550381', '2'), ('20190201095618100000424', '20190201095617100000387', '6', '0.170556', '0.0842665', '1'), ('20190201095618100000425', '20190201095617100000389', '6', '0.00948732', '0.158027', '2'), ('20190201095618100000426', '20190201095617100000390', '6', '0.0663374', '0.498708', '2'), ('20190201095618100000427', '20190201095617100000391', '6', '0.098965', '0.226774', '2'), ('20190201095618100000428', '20190201095617100000386', '7', '0.207877', '0.721676', '2'), ('20190201095618100000429', '20190201095617100000388', '7', '0.179079', '0.569131', '2'), ('20190201095618100000430', '20190201095617100000387', '7', '0.126434', '0.0665981', '1'), ('20190201095618100000431', '20190201095617100000389', '7', '0.102951', '0.0927845', '1'), ('20190201095618100000432', '20190201095617100000390', '7', '0.0516463', '0.237405', '2'), ('20190201095618100000433', '20190201095617100000391', '7', '0.0228712', '0.6521', '2'), ('20190201095639100000441', '20190201095639100000436', '1', '0.22386', '0.62726', '2'), ('20190201095639100000442', '20190201095639100000437', '1', '0.285162', '0.605108', '2'), ('20190201095639100000443', '20190201095639100000435', '1', '0.258294', '0.120044', '1'), ('20190201095639100000444', '20190201095639100000438', '1', '0.390893', '0.335713', '1'), ('20190201095639100000445', '20190201095639100000439', '1', '0.206247', '0.105049', '1'), ('20190201095639100000446', '20190201095639100000440', '1', '0.413522', '0.19178', '1'), ('20190201095639100000447', '20190201095639100000436', '2', '0.108156', '0.044192', '1'), ('20190201095640100000448', '20190201095639100000437', '2', '0.149802', '0.34364', '2'), ('20190201095640100000449', '20190201095639100000435', '2', '0.0063512', '0.210133', '2'), ('20190201095640100000450', '20190201095639100000438', '2', '0.745163', '0.496764', '1'), ('20190201095640100000451', '20190201095639100000439', '2', '0.032748', '0.256094', '2'), ('20190201095640100000452', '20190201095639100000440', '2', '0.142238', '0.242908', '2'), ('20190201095640100000453', '20190201095639100000436', '3', '0.040522', '0.13499', '2'), ('20190201095640100000454', '20190201095639100000437', '3', '0.128191', '0.166158', '2'), ('20190201095640100000455', '20190201095639100000435', '3', '0.150442', '0.153237', '2'), ('20190201095640100000456', '20190201095639100000438', '3', '0.00566476', '0.0814476', '2'), ('20190201095640100000457', '20190201095639100000439', '3', '0.0277124', '0.189254', '2'), ('20190201095640100000458', '20190201095639100000440', '3', '0.0322651', '0.0924337', '2'), ('20190201095640100000459', '20190201095639100000436', '4', '0.18293', '0.302117', '2'), ('20190201095640100000460', '20190201095639100000437', '4', '0.12244', '0.138612', '2'), ('20190201095640100000461', '20190201095639100000435', '4', '0.0926849', '0.258801', '2'), ('20190201095640100000462', '20190201095639100000438', '4', '0.0388911', '0.493397', '2'), ('20190201095640100000463', '20190201095639100000439', '4', '0.103539', '0.282083', '2'), ('20190201095640100000464', '20190201095639100000440', '4', '0.266924', '0.0832279', '1'), ('20190201095640100000465', '20190201095639100000436', '5', '0.267558', '0.525664', '2'), ('20190201095640100000466', '20190201095639100000437', '5', '0.0550104', '0.50068', '2'), ('20190201095640100000467', '20190201095639100000435', '5', '0.223398', '0.0041503', '1'), ('20190201095640100000468', '20190201095639100000438', '5', '0.330094', '0.198153', '1'), ('20190201095640100000469', '20190201095639100000439', '5', '0.147873', '0.0611661', '1'), ('20190201095640100000470', '20190201095639100000440', '5', '0.246304', '0.0716032', '1'), ('20190201095641100000471', '20190201095639100000436', '6', '0.135383', '0.146529', '2'), ('20190201095641100000472', '20190201095639100000437', '6', '0.209244', '0.0766796', '1'), ('20190201095641100000473', '20190201095639100000435', '6', '0.19361', '0.0167015', '1'), ('20190201095641100000474', '20190201095639100000438', '6', '0.0686153', '0.410071', '2'), ('20190201095641100000475', '20190201095639100000439', '6', '0.260399', '0.0224807', '1'), ('20190201095641100000477', '20190201095639100000440', '6', '0.439954', '0.113165', '1'), ('20190201095641100000478', '20190201095639100000436', '7', '0.249863', '0.50137', '2'), ('20190201095641100000479', '20190201095639100000437', '7', '0.116923', '0.360282', '2'), ('20190201095641100000480', '20190201095639100000435', '7', '0.28181', '0.260849', '1'), ('20190201095641100000481', '20190201095639100000438', '7', '0.166553', '0.39175', '2'), ('20190201095641100000482', '20190201095639100000439', '7', '0.200224', '0.0161239', '1'), ('20190201095641100000483', '20190201095639100000440', '7', '0.504005', '0.299931', '1'), ('20190201095641100000490', '20190201095641100000484', '1', '0.168664', '0.051786', '1'), ('20190201095641100000491', '20190201095641100000485', '1', '0.072741', '0.25281', '2'), ('20190201095642100000492', '20190201095641100000486', '1', '0.265126', '0.141382', '1'), ('20190201095642100000493', '20190201095641100000487', '1', '0.583779', '0.605397', '2'), ('20190201095642100000494', '20190201095641100000488', '1', '0.144732', '0.102147', '1'), ('20190201095642100000495', '20190201095641100000489', '1', '0.554273', '0.0305923', '1'), ('20190201095642100000496', '20190201095641100000484', '2', '0.153822', '0.656757', '2'), ('20190201095642100000497', '20190201095641100000485', '2', '0.2348', '0.127881', '1'), ('20190201095642100000498', '20190201095641100000486', '2', '0.141192', '0.254242', '2'), ('20190201095642100000499', '20190201095641100000487', '2', '0.0734152', '0.416351', '2'), ('20190201095642100000500', '20190201095641100000488', '2', '0.00704492', '0.239213', '2'), ('20190201095642100000501', '20190201095641100000489', '2', '0.266969', '0.166861', '1'), ('20190201095642100000502', '20190201095641100000484', '3', '0.158492', '0.151707', '1'), ('20190201095642100000503', '20190201095641100000485', '3', '0.225052', '0.201587', '1'), ('20190201095642100000504', '20190201095641100000486', '3', '0.0744811', '0.0615043', '1'), ('20190201095642100000505', '20190201095641100000487', '3', '0.627657', '0.373196', '1'), ('20190201095642100000506', '20190201095641100000488', '3', '0.0396224', '0.0166356', '1'), ('20190201095642100000507', '20190201095641100000489', '3', '0.282919', '0.233678', '1'), ('20190201095642100000508', '20190201095641100000484', '4', '0.139832', '0.565625', '2'), ('20190201095642100000509', '20190201095641100000485', '4', '0.139432', '0.0921329', '1'), ('20190201095642100000510', '20190201095641100000486', '4', '0.221792', '0.169038', '1'), ('20190201095642100000511', '20190201095641100000487', '4', '0.748925', '0.266573', '1'), ('20190201095642100000512', '20190201095641100000488', '4', '0.0941528', '0.280908', '2'), ('20190201095642100000513', '20190201095641100000489', '4', '0.467705', '0.16381', '1'), ('20190201095642100000514', '20190201095641100000484', '5', '0.27987', '0.658635', '2'), ('20190201095642100000515', '20190201095641100000485', '5', '0.276857', '0.197157', '1'), ('20190201095643100000516', '20190201095641100000486', '5', '0.272948', '0.174643', '1'), ('20190201095643100000517', '20190201095641100000487', '5', '0.0667222', '0.484451', '2'), ('20190201095643100000518', '20190201095641100000488', '5', '0.175079', '0.188282', '2'), ('20190201095643100000519', '20190201095641100000489', '5', '0.744684', '0.237699', '1'), ('20190201095643100000520', '20190201095641100000484', '6', '0.053189', '0.297399', '2'), ('20190201095643100000521', '20190201095641100000485', '6', '0.18738', '0.211578', '2');
INSERT INTO `fight_detail` VALUES ('20190201095643100000522', '20190201095641100000486', '6', '0.0521222', '0.259905', '2'), ('20190201095643100000523', '20190201095641100000487', '6', '0.495195', '0.132995', '1'), ('20190201095643100000524', '20190201095641100000488', '6', '0.102362', '0.127155', '2'), ('20190201095643100000525', '20190201095641100000489', '6', '0.266582', '0.0299511', '1'), ('20190201095643100000526', '20190201095641100000484', '7', '0.0450129', '0.552428', '2'), ('20190201095643100000527', '20190201095641100000485', '7', '0.0358139', '0.0984523', '2'), ('20190201095643100000528', '20190201095641100000486', '7', '0.0764064', '0.177215', '2'), ('20190201095643100000529', '20190201095641100000487', '7', '0.229121', '0.153504', '1'), ('20190201095643100000530', '20190201095641100000488', '7', '0.212488', '0.0780272', '1'), ('20190201095643100000531', '20190201095641100000489', '7', '0.682442', '0.17605', '1');
COMMIT;

-- ----------------------------
-- Table structure for `match`
-- ----------------------------
DROP TABLE IF EXISTS `match`;
CREATE TABLE `match` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`name`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`firstwin`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`secondwin`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`thirdwin`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`matchdate`  datetime NULL DEFAULT NULL ,
`matchnum`  int(9) NULL DEFAULT NULL COMMENT '比赛次数(奇数，获胜次数大过一半的胜利)' ,
`usernum`  int(9) NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of match
-- ----------------------------
BEGIN;
INSERT INTO `match` VALUES ('20190108223343100000286', '测试赛制', '1002', '1001', null, null, '7', '7'), ('20190201095432100000336', '测试赛制', '1002', '1001', null, null, '7', '7'), ('20190201095617100000385', '测试赛制', '1002', '1007', null, null, '7', '7'), ('20190201095639100000434', '测试赛制', '1002', '1003', null, null, '7', '7'), ('20190201095641100000476', '测试赛制', '1001', '1005', null, null, '7', '7');
COMMIT;

-- ----------------------------
-- Table structure for `sequence`
-- ----------------------------
DROP TABLE IF EXISTS `sequence`;
CREATE TABLE `sequence` (
`name`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`value`  int(9) NULL DEFAULT 100000000 ,
`min`  int(9) NULL DEFAULT 100000000 ,
`max`  int(9) NULL DEFAULT 999999999 ,
`increment`  int(9) NULL DEFAULT 1 ,
PRIMARY KEY (`name`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of sequence
-- ----------------------------
BEGIN;
INSERT INTO `sequence` VALUES ('id', '100000531', '100000000', '999999999', '1');
COMMIT;

-- ----------------------------
-- Table structure for `st_assignment`
-- ----------------------------
DROP TABLE IF EXISTS `st_assignment`;
CREATE TABLE `st_assignment` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`task_id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`create_time`  date NULL DEFAULT NULL ,
`update_time`  date NULL DEFAULT NULL ,
`desc`  varchar(3072) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_assignment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `st_assignment_note`
-- ----------------------------
DROP TABLE IF EXISTS `st_assignment_note`;
CREATE TABLE `st_assignment_note` (
`ass_id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`note`  varchar(3072) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`ass_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_assignment_note
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `st_star`
-- ----------------------------
DROP TABLE IF EXISTS `st_star`;
CREATE TABLE `st_star` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`star_name`  varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`star_type`  char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `uk_star_type` (`star_type`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_star
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `st_star_temp`
-- ----------------------------
DROP TABLE IF EXISTS `st_star_temp`;
CREATE TABLE `st_star_temp` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`task_id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`desc`  varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_star_temp
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `st_task`
-- ----------------------------
DROP TABLE IF EXISTS `st_task`;
CREATE TABLE `st_task` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`task_name`  varchar(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`state`  char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`expect_num`  int(9) NULL DEFAULT NULL ,
`star_num`  int(9) NULL DEFAULT NULL ,
`desc`  varchar(3072) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`star_type`  char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`create_time`  date NULL DEFAULT NULL ,
`update_time`  date NULL DEFAULT NULL ,
`userid`  varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_task
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `st_task_note`
-- ----------------------------
DROP TABLE IF EXISTS `st_task_note`;
CREATE TABLE `st_task_note` (
`task_id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`add_star_num`  int(9) NULL DEFAULT NULL ,
`now_star_num`  int(9) NULL DEFAULT NULL ,
`note`  varchar(3072) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`create_time`  date NULL DEFAULT NULL ,
PRIMARY KEY (`task_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of st_task_note
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`username`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参与者' ,
`create_time`  datetime NULL DEFAULT NULL ,
`update_time`  datetime NULL DEFAULT NULL ,
`luck`  float NULL DEFAULT 0 COMMENT '运气' ,
`winpoint`  float NULL DEFAULT 0.3 ,
`fightcount`  int(9) NULL DEFAULT 0 ,
`wincount`  int(9) NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `user_id_seq` (`id`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=Dynamic

;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1001', '小勇', '2019-01-08 21:12:04', '2019-01-08 21:12:11', '0', '0.75', '11', '7'), ('1002', '小葱', '2019-01-08 21:12:48', '2019-01-08 21:12:50', '0', '0.66', '14', '13'), ('1003', '小龙', '2019-01-08 21:13:56', '2019-01-08 21:14:00', '0', '0.3', '7', '2'), ('1004', '小可', '2019-01-08 21:14:57', '2019-01-08 21:15:01', '0', '0.3', '7', '2'), ('1005', '小如', '2019-01-08 21:15:04', '2019-01-08 21:15:06', '0', '0.3', '8', '3'), ('1006', '小补', '2019-01-08 21:15:09', '2019-01-08 21:15:11', '0', '0.3', '6', '1'), ('1007', '小朱', '2019-01-08 21:15:14', '2019-01-08 21:15:17', '0', '0.3', '7', '2');
COMMIT;

-- ----------------------------
-- Function structure for `nextval`
-- ----------------------------
DROP FUNCTION IF EXISTS `nextval`;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `nextval`(n VARCHAR(20)) RETURNS int(9)
BEGIN

declare nv int;

set nv = (select case when value+increment>max then min else value+increment end from sequence where name=n);
update sequence set value=nv where name=n;

return nv;

END
;;
DELIMITER ;
